home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / tchk21.arc / INCLUDE.ARC / MOUSEHK.H < prev    next >
C/C++ Source or Header  |  1989-06-20  |  3KB  |  66 lines

  1. /* TCHK 2.1 - Howard Kapustein's Turbo C library        6-6-89      */
  2. /* Copyright (C) 1988,1989 Howard Kapustein.  All rights reserved.  */
  3.  
  4. /* mousehk.h  -  header file for mouse routines */
  5.  
  6. #ifndef MOUSEHK_HEADER
  7. #define MOUSEHK_HEADER  1
  8.  
  9. #include <howard.h>
  10.  
  11. #define MOUSEINT        0x33    /* mouse INTerrupt */
  12.  
  13. #define MOUSE_INSTALLED -1      /* mouse hardware/driver installed */
  14. #define NO_MOUSE        0       /* mouse hardware/driver not installed */
  15.  
  16. #define TWOBUTTONS      -1      /* 2 buttons */
  17. #define XBUTTONS        0       /* other than 2 buttons */
  18. #define MSYSMOUSE       3       /* Mouse Systems mouse (PC Mouse) */
  19.  
  20. #define LEFTBUTTON      0
  21. #define RIGHTBUTTON     1
  22. #define MIDDLEBUTTON    2
  23.  
  24. #define LBPRESSED       0x01    /* Left button pressed */
  25. #define RBPRESSED       0x02    /* Right button pressed */
  26. #define MBPRESSED       0x04    /* Middle button pressed */
  27.  
  28. /* mouse info */
  29. boolean ismouse(void);          /* is mouse driver installed */
  30. int MButtonPress(int button);   /* mouse button press data */
  31. int MButtonRelease(int button); /* mouse button release data */
  32. int MButtonStatus(void);        /* mouse button status */
  33. int MMickeysMovedx(void);       /* numbers of mickeys mouse moved horizontally */
  34. int MMickeysMovedy(void);       /* numbers of mickeys mouse moved vertically */
  35.  
  36. /* cursor control */
  37. void MCursorOff(void);          /* mouse cursor off (nestable) */
  38. void MCursorOn(void);           /* mouse cursor on (nestable) */
  39. void MCursorRangex(int left, int right);    /* mouse cursor horizontal range */
  40. void MCursorRangey(int top, int bottom);    /* mouse cursor vertical range */
  41. void MCursorGraphic(int hotx, int hoty, char *bitmap);          /* define graphics cursor */
  42. void MCursorText(boolean usehardware, int parm1, int parm2);    /* define text cursor */
  43. void MGotoxy(int x, int y);     /* position mouse cursor */
  44.  
  45. /* mouse driver */
  46. unsigned int MDriverSize(void); /* size of buffer needed to store driver state */
  47. void MGetDriver(char far *savebuffer);      /* save mouse driver state */
  48. void MPutDriver(char far *savebuffer);      /* restore mouse driver state */
  49. boolean MouseReset(void);                   /* Reset mouse software only */
  50. unsigned int MGetVerType(void);             /* Get software version and mouse type */
  51.  
  52. /* mouse screen interaction */
  53. unsigned MGetDisplayPage(void);             /* Get display page number */
  54. void MSetDisplayPage(unsigned page);        /* Set display page number */
  55. void MUpdateScreen(int left, int top, int right, int bottom);   /* update screen region */
  56.  
  57. /* mouse settings */
  58. void MEmulateLightpenOn(void);  /* mouse emulate light pen on */
  59. void MEmulateLightpenOff(void); /* mouse emulate light pen off */
  60. void MSetRatio(int mickeyx, int mickeyy);   /* set mickey to pixel ratio */
  61. void MSetThreshold(int speed);  /* set the double speed threshold */
  62. unsigned MGetSensitivity(void);             /* Get mouse sensitivity */
  63. void MSetSensitivity(int horiz, int vert, int dspeedthresh);    /* Set mouse sensitivity */
  64.  
  65. #endif              /* MOUSEHK_HEADER */
  66.